home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Plus 1995 #5 & #6
/
Amiga Plus CD - 1995 - No. 5 and 6.iso
/
pd
/
netz
/
term
/
extras
/
source
/
gtlayout-source.lha
/
LTP_RenderArrow.c
< prev
next >
Wrap
C/C++ Source or Header
|
1995-03-13
|
851b
|
47 lines
/* GadTools layout toolkit
**
** Copyright © 1993-1995 by Olaf `Olsen' Barthel
** Freely distributable.
*/
#include "gtlayout_global.h"
#ifdef DO_TAPEDECK_KIND
VOID __regargs
LTP_RenderArrow(struct RastPort *RPort,BOOLEAN LeftDirection,LONG Left,LONG Top,LONG Width,LONG Height)
{
LONG i,Len,Start;
if(LeftDirection)
{
for(i = 0 ; i < Width ; i++)
{
Len = ((Height * (i + 1)) / Width) & ~1;
if(Len < Height)
Len++;
Start = Top + (Height - Len) / 2;
Move(RPort,Left + i,Start);
Draw(RPort,Left + i,Start + Len - 1);
}
}
else
{
for(i = 0 ; i < Width ; i++)
{
Len = ((Height * (i + 1)) / Width) & ~1;
if(Len < Height)
Len++;
Start = Top + (Height - Len) / 2;
Move(RPort,Left + Width - 1 - i,Start);
Draw(RPort,Left + Width - 1 - i,Start + Len - 1);
}
}
}
#endif /* DO_TAPEDECK_KIND */